package com.gin.no_gay_alliance.viewmodel;

import com.gin.nga.response.forum.ForumSubGroup;

import java.util.List;
import java.util.stream.Collectors;

/**
 * 版面/合集 入口分组
 *
 * @author : ginstone
 * @version : v1.0.0
 * @since : 2023/8/4 14:16
 **/
public class EntrySubGroup {
    public String name;
    public List<EntryData> entries;

    public EntrySubGroup(ForumSubGroup forumSubGroup) {
        this.name = forumSubGroup.getName();
        this.entries = forumSubGroup.getForums().values().stream().map(EntryData::new).collect(Collectors.toList());
    }

    public EntrySubGroup() {
    }
}
